package com.center.xx1;

import java.util.UUID;

public class OutServer {
	
	private String registerId;
	private String type;
	private String queueName;
	private Centers centers;
	
	public void outServer(String type,String queueName,Centers centers){
		this.type = type;
		this.queueName = queueName;
		this.centers = centers;
		this.registerId = UUID.randomUUID().toString().replaceAll("-", "");
		if(type.equals("fbdy")){
			centers.dyzRegister(queueName, registerId);
		}
	}
	
	public void unRegister(){
		centers.dyzUnRegister(queueName, registerId);
	}
	
	public Object getData() throws Exception{
		return centers.outQueue(queueName, type);
	}
	
}
